#region Usings

using System;
using System.Collections.Generic;
using Castle.ActiveRecord;
using Karma.Framework.Core.Domain;

#endregion

namespace Karma.Framework.Core.Metadata.Mapping
{
    [ActiveRecord("[Editor]")]
    public class Editor : DomainObject
    {
        [JoinedKey]
        public override Int64 Id { get; set; }

        [Property]
        public string Layout { get; set; }

        [HasMany(typeof (Field), Cascade = ManyRelationCascadeEnum.All, Lazy = false,
            ColumnKey = "[Editor]", Table = "[Field]")]
        public IList<Field> Fields { get; set; }

        [HasMany(typeof(Section), Cascade = ManyRelationCascadeEnum.All, Lazy = false,
        ColumnKey = "[Editor]", Table = "[Section]")]
        public IList<Section> Sections { get; set; }
    }

}